{% extends 'base.html' %}

{% load pp_url %}
{% load topictags %}
{% load issuetags %}
{% load consensustags %}
{% load argumenttags %}
{% load solutiontags %}

{% block title %}
{% if request.object %}{{ request.object.text }}{% else %}All {% endif %}{{request.dimension|title}} Issues
{% endblock title %}
{% block css %}

{% endblock %}

                    {% block browser_bar %}
					<ul>
					<li><a STYLE="text-decoration:none" href="{% pp_url template='issues.html' dimension='hot' object=request.object start=request.start end=request.end %}">{% ifequal "hot" request.dimension %}<b>hot</b>{% else %}hot{% endifequal %}</a></li> | 
					<li><a STYLE="text-decoration:none" href="{% pp_url template='issues.html' dimension='cont' object=request.object start=request.start end=request.end %}">{% ifequal "cont" request.dimension %}<b>controversial</b>{% else %}controversial{% endifequal %}</a></li> |
						<li><a STYLE="text-decoration:none" href="{% pp_url template='issues.html' dimension='new' object=request.object start=request.start end=request.end %}">{% ifequal "new" request.dimension %}<b>new</b>{% else %}new{% endifequal %}</a></li>
					</ul>
                    {% endblock %}

{% block content %}
	<div class="stage">

		<div class="issuemask">
            {% if request.object %}
            <div class="pagehead">{{ request.object.text|title }} {{request.dimension|title}} Issues </div>
            {% else %}<div class="pagehead"> All {{request.dimension|title}} Issues </div>
            {% endif %}
           <div class="issuebound">

            {% pp_get_issue_list dimension=request.dimension topic=request.object start=request.start end=request.end %}

                 {% for iss_obj in pp_issue.issue_list %}

                    {% include '_issue.html' %}    <br>

                {% empty %}
                <div class="pagehead">
                There doesn't seem to be anything here yet.
                </div>
                {% endfor %}
            {% if pp_solution.count > 20 %}
            <div class="pagination">
            <br>    <p><
                {% for s,e,n in request.rangelist %}
                   {% if not s > pp_issue.count %}
                    <a href="{% pp_url template='issues.html' dimension=request.dimension object=request.object start=s end=e %}">{% ifequal s request.start %}<b>{{n}}</b>{% else %}{{n}}{% endifequal %}</a> 
                    {% endif %}
                {% endfor %}
                ></p>
            </div>	   		
            {% endif %}
            {% endpp_get_issue_list %}
            </div>

             <div class="rightcol">
            {% if request.user.is_authenticated %}
            <ul><a href="{% pp_url template='submit_issue.html' object=request.object %}" class='button blue'>Submit Issue</a></ul>
            {% else %}
            <ul><a href="{% pp_url template='register.html' %}" class='button blue'>Submit Issue</a></ul>
            {% endif %}
			{% include '_rightcol.html' %}
            </div>
		</div>
	</div>
{% endblock content %}
</body>
</html>
						

